import { _API_OPERATIONNAL_DOC_PAGELIST, PROJECT_BY_USERID, LOGIN_SSO, _API_OPERATIONNAL_DOC_SAVEORUPDATE, _API_UPLOAD_BIPFILEUPLOAD, _API_LOWCOST_TEMPLATEEXPORT, _API_OPERATIONNAL_INFO_IMPORT, _API_OPERATIONNAL_INFO_PAGELIST, _API_LOWCOST_PAGELIST, _API_LOWCOST_SAVEORUPDATE, _API_LOWCOST_DELETEBYIDS, _API_OPERATIONNAL_PAGELIST, _API_OPERATIONNAL_SAVEORUPDATE, _API_OPERATIONNAL_TEMPLATEEXPORT, _API_OPERATIONNAL_DELETEBYIDS, _API_OPERATIONNAL_INFO_EXPORT, _API_UPLOAD_GETFILEBYSTRING } from '@/api/global.js'
import { commonPromise } from '@/http'
export default {
    // 公共接口
    ApiUsers: (params) => commonPromise({ params, url: 'https://wei.cscec5b.com.cn:9067/gateway/progress-server/api/projectPlanLedger/project/psnList', method: 'get' }),
    // 上传接口
    ApiUploadFetch: (data) => commonPromise({ data, url: 'https://wei.cscec5b.com.cn:9067/gateway/progress-server/api/upload', method: 'post' }), // 上传接口
    ApiUploadGetFileByStringFetch: (params) => commonPromise({ params, url: _API_UPLOAD_GETFILEBYSTRING, method: 'get' }), // 根据加密字符串获取文件url列表

    // 项目运营单据表(列表)

    ApiOperationalDocPageList: (data) => commonPromise({ data, url: _API_OPERATIONNAL_DOC_PAGELIST, method: 'post' }),
    ApiOperationalDocSaveOrUpdate: (data) => commonPromise({ data, url: _API_OPERATIONNAL_DOC_SAVEORUPDATE, method: 'post' }),

    // 项目运营信息表档案
    ApiOperationalPageList: (data) => commonPromise({ data, url: _API_OPERATIONNAL_PAGELIST, method: 'post' }),
    ApiOperationalSaveOrUpdate: (data) => commonPromise({ data, url: _API_OPERATIONNAL_SAVEORUPDATE, method: 'post' }),
    ApiOperationalTemplateExport: (params) => commonPromise({ params, url: _API_OPERATIONNAL_TEMPLATEEXPORT, method: 'get' }),
    ApiOperationalDeleteByIds: (data) => commonPromise({ data, url: _API_OPERATIONNAL_DELETEBYIDS, method: 'post' }),
    ApiOperationalInfoExport: (params) => commonPromise({ params, url: _API_OPERATIONNAL_INFO_EXPORT, method: 'get' }),
    ApiOperationalInfoPageList: (data) => commonPromise({ data, url: _API_OPERATIONNAL_INFO_PAGELIST, method: 'post' }),
    ApiOperationalInfoImport: (data) => commonPromise({ data, url: _API_OPERATIONNAL_INFO_IMPORT, method: 'post' }),
    // 项目运营填报统计
    getFullCount: (data) => commonPromise({ data, url: 'proj/operational/info/doc/full/count', method: 'post' }),


    // 低成本晾晒
    ApiLowcostPageList: (data) => commonPromise({ data, url: _API_LOWCOST_PAGELIST, method: 'post' }),
    ApiLowcostSaveOrUpdate: (data) => commonPromise({ data, url: _API_LOWCOST_SAVEORUPDATE, method: 'post' }),
    ApiLowcostDeleteByIds: (data) => commonPromise({ data, url: _API_LOWCOST_DELETEBYIDS, method: 'post' }),
    ApiLowcostTemplateExport: (params) => commonPromise({ params, url: _API_LOWCOST_TEMPLATEEXPORT, method: 'get' }),

    // 上传文件
    ApiBipFileUpload: (id, data) => commonPromise({ data, url: 'upload/bipFileUpload?businessId=' + id, method: 'post' }),
    // 登录API
    loginSsoFetch: (params) => commonPromise({ params, url: LOGIN_SSO, method: 'get' }), // 单点登录接口
    // 项目
    projectFetch: (params) => commonPromise({ params, url: PROJECT_BY_USERID, method: 'get' }),

    // 商务人员接口
    // 员工调入
    importEmployee: (data) => commonPromise({ data, url: 'business/employee/maintain/employee/import', method: 'post' }),
    // 新增外部员工
    addExternalEmployee: (data) => commonPromise({ data, url: 'business/employee/maintain/add/external/employee', method: 'post' }),
    // 新增或更新商务人员总表
    updateEmployeeInfo: (data) => commonPromise({ data, url: 'business/employee/maintain/save/or/update/business/employee/info', method: 'post' }),
    // 商务人员清单
    fetchEmployeeList: (data) => commonPromise({ data, url: 'business/employee/maintain/get/project/employee/inventory/by/projectCode', method: 'post' }),
    getEmployeeInfo: (params) => commonPromise({ params, url: 'business/employee/maintain/get/business/employee/basic/information/by/id/card', method: 'get' }),
    // 调入外部员工列表
    fetchOuterStaffList: (data) => commonPromise({ data, url: 'business/employee/maintain/get/external/personnel', method: 'post' }),
    // 调入内部员工列表
    fetchInnerrStaffList: (data) => commonPromise({ data, url: 'master/data/get/master/employee/data/page', method: 'post' }),

    // 岗位列表
    getPostList: (params) => commonPromise({ params, url: 'custom/get/project/post/record', method: 'get' }),
    // 政治面貌列表
    getPoliticsList: (data) => commonPromise({ data, url: 'custom/get/politics/record', method: 'post' }),

    // 获取项目列表
    getProjectList: (data) => commonPromise({ data, url: 'https://wei.cscec5b.com.cn:9067/gateway/business-insight/api/business/employee/maintain/project/page', method: 'post' }),


    // 项目商务信息
    // ............................................
    // 1.获取项目商务列表
    // 接口直接使用getProjectList(获取项目列表)
    // 2.获取项目商务信息详情
    getProjectBusinessInfoDetail: (params) => commonPromise({ params, url: 'project/business/infoApi/getProjectBusinessInfoDetail', method: 'get' }),
    // 3.项目商务信息添加
    addOrEdit:(data) => commonPromise({ data, url: 'project/business/infoApi/addOrEdit', method: 'post' }),
    // 4.补充协议编辑-添加
    addOrUpdateSupplementalAgreement:(data) => commonPromise({ data, url: 'project/business/infoApi/addOrUpdateSupplementalAgreement', method: 'post' }),
    // 5.删除补充协议
    deleteSupplementalAgreement: (params) => commonPromise({ params, url: 'project/business/infoApi/deleteSupplementalAgreement', method: 'get' }),

}
